    $(document).ready(function(){
        var range = 1080;        
		var elemt = 1000;       
        var maxnum = 100;       
        var num = 1;
		var Num = 10;
        var totalheight = 800; 
        var main = $(".cd9");                 
        $(window).scroll(function(){
            var srollPos = $(window).scrollTop();       
            totalheight = parseFloat($(window).height()) + parseFloat(srollPos);
            if(($(document).height()-range) <= totalheight  && num != maxnum ) {
				
				var Random = parseInt(100*Math.random());
                var textnode=main.append("<div class='cd' style='margin-top:221.75px;' ><div class='tp'><img src='../3-动态代码/img/加载图片/菜式 ("+num+").jpg' width='500' height='373' alt='img1' style='width:167px; height:124px;'/></div><div class='mc'>菜式（"+Num+"）</div><div class='jg'>价格："+Random+"</div><input id='btn' name='btn1' type='button' value='查看' onclick='cdClick()' style='width:100px; height:70px;'></div>");
                num++;
				Num++;
			
            }
        });
    });